3.3.41 \(\int \frac {\cot ^3(e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\) [241]

3.3.41.1 Optimal result
3.3.41.2 Mathematica [A] (verified)
3.3.41.3 Rubi [A] (warning: unable to verify)
3.3.41.4 Maple [A] (verified)
3.3.41.5 Fricas [B] (verification not implemented)
3.3.41.6 Sympy [F(-1)]
3.3.41.7 Maxima [A] (verification not implemented)
3.3.41.8 Giac [B] (verification not implemented)
3.3.41.9 Mupad [B] (verification not implemented)

3.3.41.1 Optimal result

Integrand size = 23, antiderivative size = 181 \[ \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\cot ^2(e+f x)}{2 a^3 f}-\frac {\log (\cos (e+f x))}{(a-b)^3 f}-\frac {(a+3 b) \log (\tan (e+f x))}{a^4 f}-\frac {b^2 \left (6 a^2-8 a b+3 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^4 (a-b)^3 f}+\frac {b^2}{4 a^2 (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}+\frac {(3 a-2 b) b^2}{2 a^3 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )} \]

output
-1/2*cot(f*x+e)^2/a^3/f-ln(cos(f*x+e))/(a-b)^3/f-(a+3*b)*ln(tan(f*x+e))/a^ 
4/f-1/2*b^2*(6*a^2-8*a*b+3*b^2)*ln(a+b*tan(f*x+e)^2)/a^4/(a-b)^3/f+1/4*b^2 
/a^2/(a-b)/f/(a+b*tan(f*x+e)^2)^2+1/2*(3*a-2*b)*b^2/a^3/(a-b)^2/f/(a+b*tan 
(f*x+e)^2)
 
3.3.41.2 Mathematica [A] (verified)

Time = 2.23 (sec) , antiderivative size = 144, normalized size of antiderivative = 0.80 \[ \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {\cot ^2(e+f x)}{a^3}-\frac {b^4}{2 a^4 (a-b) \left (b+a \cot ^2(e+f x)\right )^2}+\frac {(4 a-3 b) b^3}{a^4 (a-b)^2 \left (b+a \cot ^2(e+f x)\right )}+\frac {b^2 \left (6 a^2-8 a b+3 b^2\right ) \log \left (b+a \cot ^2(e+f x)\right )}{a^4 (a-b)^3}+\frac {2 \log (\sin (e+f x))}{(a-b)^3}}{2 f} \]

input
Integrate[Cot[e + f*x]^3/(a + b*Tan[e + f*x]^2)^3,x]
 
output
-1/2*(Cot[e + f*x]^2/a^3 - b^4/(2*a^4*(a - b)*(b + a*Cot[e + f*x]^2)^2) + 
((4*a - 3*b)*b^3)/(a^4*(a - b)^2*(b + a*Cot[e + f*x]^2)) + (b^2*(6*a^2 - 8 
*a*b + 3*b^2)*Log[b + a*Cot[e + f*x]^2])/(a^4*(a - b)^3) + (2*Log[Sin[e + 
f*x]])/(a - b)^3)/f
 
3.3.41.3 Rubi [A] (warning: unable to verify)

Time = 0.40 (sec) , antiderivative size = 166, normalized size of antiderivative = 0.92, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4153, 354, 99, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\tan (e+f x)^3 \left (a+b \tan (e+f x)^2\right )^3}dx\)

\(\Big \downarrow \) 4153

\(\displaystyle \frac {\int \frac {\cot ^3(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^3}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 354

\(\displaystyle \frac {\int \frac {\cot ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a\right )^3}d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 99

\(\displaystyle \frac {\int \left (-\frac {\left (6 a^2-8 b a+3 b^2\right ) b^3}{a^4 (a-b)^3 \left (b \tan ^2(e+f x)+a\right )}-\frac {(3 a-2 b) b^3}{a^3 (a-b)^2 \left (b \tan ^2(e+f x)+a\right )^2}-\frac {b^3}{a^2 (a-b) \left (b \tan ^2(e+f x)+a\right )^3}+\frac {\cot ^2(e+f x)}{a^3}+\frac {(-a-3 b) \cot (e+f x)}{a^4}+\frac {1}{(a-b)^3 \left (\tan ^2(e+f x)+1\right )}\right )d\tan ^2(e+f x)}{2 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {(a+3 b) \log \left (\tan ^2(e+f x)\right )}{a^4}+\frac {b^2 (3 a-2 b)}{a^3 (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac {\cot (e+f x)}{a^3}+\frac {b^2}{2 a^2 (a-b) \left (a+b \tan ^2(e+f x)\right )^2}-\frac {b^2 \left (6 a^2-8 a b+3 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{a^4 (a-b)^3}+\frac {\log \left (\tan ^2(e+f x)+1\right )}{(a-b)^3}}{2 f}\)

input
Int[Cot[e + f*x]^3/(a + b*Tan[e + f*x]^2)^3,x]
 
output
(-(Cot[e + f*x]/a^3) - ((a + 3*b)*Log[Tan[e + f*x]^2])/a^4 + Log[1 + Tan[e 
 + f*x]^2]/(a - b)^3 - (b^2*(6*a^2 - 8*a*b + 3*b^2)*Log[a + b*Tan[e + f*x] 
^2])/(a^4*(a - b)^3) + b^2/(2*a^2*(a - b)*(a + b*Tan[e + f*x]^2)^2) + ((3* 
a - 2*b)*b^2)/(a^3*(a - b)^2*(a + b*Tan[e + f*x]^2)))/(2*f)
 

3.3.41.3.1 Defintions of rubi rules used

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(m - 1)/2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4153
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], 
 x]}, Simp[c*(ff/f)   Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f 
f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, 
n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio 
nalQ[n]))
 
3.3.41.4 Maple [A] (verified)

Time = 0.63 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.96

method result size
derivativedivides \(\frac {-\frac {b^{3} \left (\frac {\left (6 a^{2}-8 a b +3 b^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{b}-\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}-\frac {a \left (3 a^{2}-5 a b +2 b^{2}\right )}{b \left (a +b \tan \left (f x +e \right )^{2}\right )}\right )}{2 a^{4} \left (a -b \right )^{3}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}-\frac {1}{2 a^{3} \tan \left (f x +e \right )^{2}}+\frac {\left (-3 b -a \right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{4}}}{f}\) \(173\)
default \(\frac {-\frac {b^{3} \left (\frac {\left (6 a^{2}-8 a b +3 b^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{b}-\frac {a^{2} \left (a^{2}-2 a b +b^{2}\right )}{2 b \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}-\frac {a \left (3 a^{2}-5 a b +2 b^{2}\right )}{b \left (a +b \tan \left (f x +e \right )^{2}\right )}\right )}{2 a^{4} \left (a -b \right )^{3}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 \left (a -b \right )^{3}}-\frac {1}{2 a^{3} \tan \left (f x +e \right )^{2}}+\frac {\left (-3 b -a \right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{4}}}{f}\) \(173\)
norman \(\frac {-\frac {1}{2 a f}+\frac {\left (3 a^{2} b -10 a \,b^{2}+6 b^{3}\right ) b \tan \left (f x +e \right )^{4}}{2 a^{3} f \left (a^{2}-2 a b +b^{2}\right )}+\frac {\left (4 a^{2} b -15 a \,b^{2}+9 b^{3}\right ) b^{2} \tan \left (f x +e \right )^{6}}{4 a^{4} f \left (a^{2}-2 a b +b^{2}\right )}}{\tan \left (f x +e \right )^{2} \left (a +b \tan \left (f x +e \right )^{2}\right )^{2}}+\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2 f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {\left (a +3 b \right ) \ln \left (\tan \left (f x +e \right )\right )}{a^{4} f}-\frac {b^{2} \left (6 a^{2}-8 a b +3 b^{2}\right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )}{2 a^{4} f \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}\) \(253\)
parallelrisch \(\frac {-48 \left (a^{2}-\frac {4}{3} a b +\frac {1}{2} b^{2}\right ) b^{2} \left (\frac {\left (a -b \right )^{2} \cos \left (4 f x +4 e \right )}{4}+\left (a^{2}-b^{2}\right ) \cos \left (2 f x +2 e \right )+\frac {3 a^{2}}{4}+\frac {a b}{2}+\frac {3 b^{2}}{4}\right ) \ln \left (a +b \tan \left (f x +e \right )^{2}\right )+\left (2 a^{4} \left (a -b \right )^{2} \ln \left (\sec \left (f x +e \right )^{2}\right )-4 \left (a +3 b \right ) \left (a -b \right )^{5} \ln \left (\tan \left (f x +e \right )\right )-2 a^{5} \left (a -3 b \right ) \cot \left (f x +e \right )^{2}+22 a^{3} b^{3} \csc \left (f x +e \right )^{2}-51 a^{2} b^{4}+36 a \,b^{5}-9 b^{6}\right ) \cos \left (4 f x +4 e \right )+\left (\left (8 a^{6}-8 a^{4} b^{2}\right ) \ln \left (\sec \left (f x +e \right )^{2}\right )-16 \left (a +3 b \right ) \left (a +b \right ) \left (a -b \right )^{4} \ln \left (\tan \left (f x +e \right )\right )+\left (-8 a^{6}+24 a^{5} b -48 a^{4} b^{2}\right ) \cot \left (f x +e \right )^{2}-a^{3} b^{3} \csc \left (f x +e \right )^{2}+76 a^{2} b^{4}-96 a \,b^{5}+36 b^{6}\right ) \cos \left (2 f x +2 e \right )-7 a^{3} b^{3} \csc \left (f x +e \right )^{2} \cos \left (6 f x +6 e \right )+\left (6 a^{6}+4 a^{5} b +6 a^{4} b^{2}\right ) \ln \left (\sec \left (f x +e \right )^{2}\right )-12 \left (a -b \right )^{3} \left (a^{2}+\frac {2}{3} a b +b^{2}\right ) \left (a +3 b \right ) \ln \left (\tan \left (f x +e \right )\right )-6 a^{5} \left (a -3 b \right ) \cot \left (f x +e \right )^{2}+2 a^{3} b^{3} \csc \left (f x +e \right )^{2}-25 a^{2} b^{4}+60 a \,b^{5}-27 b^{6}}{16 \left (a -b \right )^{3} a^{4} f \left (\frac {\left (a -b \right )^{2} \cos \left (4 f x +4 e \right )}{4}+\left (a^{2}-b^{2}\right ) \cos \left (2 f x +2 e \right )+\frac {3 a^{2}}{4}+\frac {a b}{2}+\frac {3 b^{2}}{4}\right )}\) \(523\)
risch \(\text {Expression too large to display}\) \(1068\)

input
int(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x,method=_RETURNVERBOSE)
 
output
1/f*(-1/2*b^3/a^4/(a-b)^3*((6*a^2-8*a*b+3*b^2)/b*ln(a+b*tan(f*x+e)^2)-1/2* 
a^2*(a^2-2*a*b+b^2)/b/(a+b*tan(f*x+e)^2)^2-a*(3*a^2-5*a*b+2*b^2)/b/(a+b*ta 
n(f*x+e)^2))+1/2/(a-b)^3*ln(1+tan(f*x+e)^2)-1/2/a^3/tan(f*x+e)^2+(-3*b-a)/ 
a^4*ln(tan(f*x+e)))
 
3.3.41.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 545 vs. \(2 (173) = 346\).

Time = 0.32 (sec) , antiderivative size = 545, normalized size of antiderivative = 3.01 \[ \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {{\left (2 \, a^{4} b^{2} - 6 \, a^{3} b^{3} + 13 \, a^{2} b^{4} - 6 \, a b^{5}\right )} \tan \left (f x + e\right )^{6} + 2 \, a^{6} - 6 \, a^{5} b + 6 \, a^{4} b^{2} - 2 \, a^{3} b^{3} + 2 \, {\left (2 \, a^{5} b - 5 \, a^{4} b^{2} + 7 \, a^{3} b^{3} + 2 \, a^{2} b^{4} - 3 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + {\left (2 \, a^{6} - 2 \, a^{5} b - 6 \, a^{4} b^{2} + 18 \, a^{3} b^{3} - 9 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2} + 2 \, {\left ({\left (a^{4} b^{2} - 6 \, a^{2} b^{4} + 8 \, a b^{5} - 3 \, b^{6}\right )} \tan \left (f x + e\right )^{6} + 2 \, {\left (a^{5} b - 6 \, a^{3} b^{3} + 8 \, a^{2} b^{4} - 3 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + {\left (a^{6} - 6 \, a^{4} b^{2} + 8 \, a^{3} b^{3} - 3 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2}\right )} \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \, {\left ({\left (6 \, a^{2} b^{4} - 8 \, a b^{5} + 3 \, b^{6}\right )} \tan \left (f x + e\right )^{6} + 2 \, {\left (6 \, a^{3} b^{3} - 8 \, a^{2} b^{4} + 3 \, a b^{5}\right )} \tan \left (f x + e\right )^{4} + {\left (6 \, a^{4} b^{2} - 8 \, a^{3} b^{3} + 3 \, a^{2} b^{4}\right )} \tan \left (f x + e\right )^{2}\right )} \log \left (\frac {b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \, {\left ({\left (a^{7} b^{2} - 3 \, a^{6} b^{3} + 3 \, a^{5} b^{4} - a^{4} b^{5}\right )} f \tan \left (f x + e\right )^{6} + 2 \, {\left (a^{8} b - 3 \, a^{7} b^{2} + 3 \, a^{6} b^{3} - a^{5} b^{4}\right )} f \tan \left (f x + e\right )^{4} + {\left (a^{9} - 3 \, a^{8} b + 3 \, a^{7} b^{2} - a^{6} b^{3}\right )} f \tan \left (f x + e\right )^{2}\right )}} \]

input
integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")
 
output
-1/4*((2*a^4*b^2 - 6*a^3*b^3 + 13*a^2*b^4 - 6*a*b^5)*tan(f*x + e)^6 + 2*a^ 
6 - 6*a^5*b + 6*a^4*b^2 - 2*a^3*b^3 + 2*(2*a^5*b - 5*a^4*b^2 + 7*a^3*b^3 + 
 2*a^2*b^4 - 3*a*b^5)*tan(f*x + e)^4 + (2*a^6 - 2*a^5*b - 6*a^4*b^2 + 18*a 
^3*b^3 - 9*a^2*b^4)*tan(f*x + e)^2 + 2*((a^4*b^2 - 6*a^2*b^4 + 8*a*b^5 - 3 
*b^6)*tan(f*x + e)^6 + 2*(a^5*b - 6*a^3*b^3 + 8*a^2*b^4 - 3*a*b^5)*tan(f*x 
 + e)^4 + (a^6 - 6*a^4*b^2 + 8*a^3*b^3 - 3*a^2*b^4)*tan(f*x + e)^2)*log(ta 
n(f*x + e)^2/(tan(f*x + e)^2 + 1)) + 2*((6*a^2*b^4 - 8*a*b^5 + 3*b^6)*tan( 
f*x + e)^6 + 2*(6*a^3*b^3 - 8*a^2*b^4 + 3*a*b^5)*tan(f*x + e)^4 + (6*a^4*b 
^2 - 8*a^3*b^3 + 3*a^2*b^4)*tan(f*x + e)^2)*log((b*tan(f*x + e)^2 + a)/(ta 
n(f*x + e)^2 + 1)))/((a^7*b^2 - 3*a^6*b^3 + 3*a^5*b^4 - a^4*b^5)*f*tan(f*x 
 + e)^6 + 2*(a^8*b - 3*a^7*b^2 + 3*a^6*b^3 - a^5*b^4)*f*tan(f*x + e)^4 + ( 
a^9 - 3*a^8*b + 3*a^7*b^2 - a^6*b^3)*f*tan(f*x + e)^2)
 
3.3.41.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]

input
integrate(cot(f*x+e)**3/(a+b*tan(f*x+e)**2)**3,x)
 
output
Timed out
 
3.3.41.7 Maxima [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 345, normalized size of antiderivative = 1.91 \[ \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {2 \, {\left (6 \, a^{2} b^{2} - 8 \, a b^{3} + 3 \, b^{4}\right )} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{7} - 3 \, a^{6} b + 3 \, a^{5} b^{2} - a^{4} b^{3}} + \frac {2 \, a^{5} - 6 \, a^{4} b + 6 \, a^{3} b^{2} - 2 \, a^{2} b^{3} + 2 \, {\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 14 \, a^{2} b^{3} + 11 \, a b^{4} - 3 \, b^{5}\right )} \sin \left (f x + e\right )^{4} - {\left (4 \, a^{5} - 16 \, a^{4} b + 24 \, a^{3} b^{2} - 24 \, a^{2} b^{3} + 9 \, a b^{4}\right )} \sin \left (f x + e\right )^{2}}{{\left (a^{8} - 5 \, a^{7} b + 10 \, a^{6} b^{2} - 10 \, a^{5} b^{3} + 5 \, a^{4} b^{4} - a^{3} b^{5}\right )} \sin \left (f x + e\right )^{6} - 2 \, {\left (a^{8} - 4 \, a^{7} b + 6 \, a^{6} b^{2} - 4 \, a^{5} b^{3} + a^{4} b^{4}\right )} \sin \left (f x + e\right )^{4} + {\left (a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}\right )} \sin \left (f x + e\right )^{2}} + \frac {2 \, {\left (a + 3 \, b\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{4}}}{4 \, f} \]

input
integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")
 
output
-1/4*(2*(6*a^2*b^2 - 8*a*b^3 + 3*b^4)*log(-(a - b)*sin(f*x + e)^2 + a)/(a^ 
7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3) + (2*a^5 - 6*a^4*b + 6*a^3*b^2 - 2*a^2* 
b^3 + 2*(a^5 - 5*a^4*b + 10*a^3*b^2 - 14*a^2*b^3 + 11*a*b^4 - 3*b^5)*sin(f 
*x + e)^4 - (4*a^5 - 16*a^4*b + 24*a^3*b^2 - 24*a^2*b^3 + 9*a*b^4)*sin(f*x 
 + e)^2)/((a^8 - 5*a^7*b + 10*a^6*b^2 - 10*a^5*b^3 + 5*a^4*b^4 - a^3*b^5)* 
sin(f*x + e)^6 - 2*(a^8 - 4*a^7*b + 6*a^6*b^2 - 4*a^5*b^3 + a^4*b^4)*sin(f 
*x + e)^4 + (a^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3)*sin(f*x + e)^2) + 2*(a + 
 3*b)*log(sin(f*x + e)^2)/a^4)/f
 
3.3.41.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 850 vs. \(2 (173) = 346\).

Time = 1.25 (sec) , antiderivative size = 850, normalized size of antiderivative = 4.70 \[ \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Too large to display} \]

input
integrate(cot(f*x+e)^3/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")
 
output
-1/8*(4*(6*a^2*b^2 - 8*a*b^3 + 3*b^4)*log(a + 2*a*(cos(f*x + e) - 1)/(cos( 
f*x + e) + 1) - 4*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e 
) - 1)^2/(cos(f*x + e) + 1)^2)/(a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3) - 8*l 
og(abs(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1))/(a^3 - 3*a^2*b + 3*a*b 
^2 - b^3) - 2*(18*a^4*b^2 - 24*a^3*b^3 + 9*a^2*b^4 + 72*a^4*b^2*(cos(f*x + 
 e) - 1)/(cos(f*x + e) + 1) - 208*a^3*b^3*(cos(f*x + e) - 1)/(cos(f*x + e) 
 + 1) + 172*a^2*b^4*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 48*a*b^5*(cos( 
f*x + e) - 1)/(cos(f*x + e) + 1) + 108*a^4*b^2*(cos(f*x + e) - 1)^2/(cos(f 
*x + e) + 1)^2 - 368*a^3*b^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 5 
02*a^2*b^4*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 288*a*b^5*(cos(f*x 
+ e) - 1)^2/(cos(f*x + e) + 1)^2 + 64*b^6*(cos(f*x + e) - 1)^2/(cos(f*x + 
e) + 1)^2 + 72*a^4*b^2*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 208*a^3 
*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 172*a^2*b^4*(cos(f*x + e) 
 - 1)^3/(cos(f*x + e) + 1)^3 - 48*a*b^5*(cos(f*x + e) - 1)^3/(cos(f*x + e) 
 + 1)^3 + 18*a^4*b^2*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 - 24*a^3*b^ 
3*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 9*a^2*b^4*(cos(f*x + e) - 1) 
^4/(cos(f*x + e) + 1)^4)/((a^7 - 3*a^6*b + 3*a^5*b^2 - a^4*b^3)*(a + 2*a*( 
cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 4*b*(cos(f*x + e) - 1)/(cos(f*x + e 
) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)^2) + 4*(a + 3*b)*log 
(abs(-cos(f*x + e) + 1)/abs(cos(f*x + e) + 1))/a^4 - (a + 4*a*(cos(f*x ...
 
3.3.41.9 Mupad [B] (verification not implemented)

Time = 12.45 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.27 \[ \int \frac {\cot ^3(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f\,{\left (a-b\right )}^3}-\frac {\frac {1}{2\,a}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (a^2\,b^2-5\,a\,b^3+3\,b^4\right )}{2\,a^3\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (4\,a^2\,b-15\,a\,b^2+9\,b^3\right )}{4\,a^2\,\left (a^2-2\,a\,b+b^2\right )}}{f\,\left (a^2\,{\mathrm {tan}\left (e+f\,x\right )}^2+2\,a\,b\,{\mathrm {tan}\left (e+f\,x\right )}^4+b^2\,{\mathrm {tan}\left (e+f\,x\right )}^6\right )}-\frac {\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )\,\left (a+3\,b\right )}{a^4\,f}-\frac {b^2\,\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )\,\left (6\,a^2-8\,a\,b+3\,b^2\right )}{2\,a^4\,f\,{\left (a-b\right )}^3} \]

input
int(cot(e + f*x)^3/(a + b*tan(e + f*x)^2)^3,x)
 
output
log(tan(e + f*x)^2 + 1)/(2*f*(a - b)^3) - (1/(2*a) + (tan(e + f*x)^4*(3*b^ 
4 - 5*a*b^3 + a^2*b^2))/(2*a^3*(a^2 - 2*a*b + b^2)) + (tan(e + f*x)^2*(4*a 
^2*b - 15*a*b^2 + 9*b^3))/(4*a^2*(a^2 - 2*a*b + b^2)))/(f*(a^2*tan(e + f*x 
)^2 + b^2*tan(e + f*x)^6 + 2*a*b*tan(e + f*x)^4)) - (log(tan(e + f*x))*(a 
+ 3*b))/(a^4*f) - (b^2*log(a + b*tan(e + f*x)^2)*(6*a^2 - 8*a*b + 3*b^2))/ 
(2*a^4*f*(a - b)^3)